package top.bug.blog.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import top.bug.blog.entity.dto.common.BatchRequest;
import top.bug.blog.entity.dto.user.UserAddRequest;
import top.bug.blog.entity.dto.user.UserQueryRequest;
import top.bug.blog.entity.dto.user.UserResetPwdRequest;
import top.bug.blog.entity.dto.user.UserUpdateRequest;
import top.bug.blog.entity.po.User;
import top.bug.blog.entity.vo.user.LoginUserVO;
import top.bug.blog.entity.vo.user.SafeUserVO;

/**
 * @author <a href="https://github.com/jiusi66">九思.</a>
 * @email 10837907@qq.com
 * @from <a href="https://www.52bug.top">递归茶馆-www.52bug.top</a>
 * @description 用户 接口
 */
public interface UserService extends IService<User> {
    /**
     * 用户登录
     */
    LoginUserVO userLogin(String username, String password);

    /**
     * 用户登出
     */
    Boolean logout();

    /**
     * 获取当前用户信息
     */
    LoginUserVO getCurrentUserInfo();

    /**
     * 获取用户列表
     */
    Page<SafeUserVO> getUserList(UserQueryRequest queryRequest);

    /**
     * 添加用户
     */
    Boolean add(UserAddRequest addRequest);

    /**
     * 删除用户
     */
    Boolean delete(BatchRequest batchRequest);

    /**
     * 修改用户
     */
    Boolean edit(UserUpdateRequest updateRequest);

    /**
     * 重置用户密码
     */
    Boolean resetPwd(UserResetPwdRequest resetPwdRequest);
}